import Vue from 'vue'
import app from './App.vue'
import { Header } from 'mint-ui';
import { Tabbar, TabItem, Swipe, SwipeItem,Button } from 'mint-ui';
import 'mint-ui/lib/style.css'
import moment from 'moment'


//导入路由的包
import VueRouter from 'vue-router'
//安装路由模块的包
import VueResource from "vue-resource"
Vue.use(VueResource);
Vue.http.options.root = 'http://127.0.0.1:8080';
Vue.use(VueRouter);
//导入mui的样式
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
import router from './router.js'

Vue.filter('dateformat',function (strdata,pattern="YYYY-MM-DD HH:mm:ss") {
    return moment(strdata).format(pattern)
});


Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Tabbar.name, Tabbar);
Vue.component(TabItem.name, TabItem);
Vue.component(Header.name, Header);
Vue.component(Button.name, Button);

var vm = new Vue({
    el: "#app",
    render: c => c(app),
    router
});
